1. Field
The present disclosure relates to the resource management of virtual machine(s) using information regarding the activity of the virtual machine(s), and, more specifically, to the facilitating communication between two or more virtual machines via the mapping of virtual resources to physical resources.
2. Background Information
The virtualization of machine resources has been of significant interest for some time; however, with processors becoming more diverse and complex, such as processors that are deeply pipelined/super pipelined, hyperthreaded, and processors having Explicitly Parallel Instruction Computing (EPIC) architecture, and with larger instruction and data caches, virtualization of machine resources is becoming an even greater interest.
Many attempts have been made to make virtualization more efficient. For example, some vendors offer software products that have a virtual machine system that permits a machine to be partitioned, such that the underlying hardware of the machine appears as one or more independently operating virtual machines (VM). Typically, a Virtual Machine Monitor (VMM) may be a thin layer of software running on a computer and presenting to other software an abstraction of one or more VMs. Each VM, on the other hand, may function as a self-contained platform, running its own operating system (OS), or a copy of the OS, and/or a software application. Software executing within a VM is collectively referred to as “guest software”.
A typical VMM, which may be considered the host of the VMs, may enhance performance of a VM by permitting access to the underlying physical machine in some situations. A VM may see and interact with a set of virtual resources. These virtual resources may then be mapped to physical resources. The VMM is typically responsible for mapping the virtual devices to the physical devices. In general, the mapping process is the same for all devices regardless of how the device is used.
FIG. 1 is a block illustrating an embodiment of an apparatus 101 for mapping resources amongst two virtual machines 111 & 112 in accordance with a known technique. Both virtual machines see instances of virtual devices 131 & 132. In one example, the virtual devices may be network interface cards. These virtual devices may be mapped, by the VMM 180, to the physical device 190. In the example, the physical device may also be a network interface card.
Typically, when the first VM 111 wishes to use the virtual device 131, it may write data to the device's virtual memory element 121. The VMM 180 would assure that when the first VM attempts to write data to the virtual memory element, it is in fact written to the physical memory element 181 of the physical device 190. The same process occurs when the second VM 112 uses its corresponding virtual device 132. In FIG. 1, the first VM illustrates the write case, while the second VM illustrates the read case. However, bi-directional communication is often the norm.
In an example where the deices are network interfaces, if the first VM 111 wishes to communicate with a device outside the apparatus 101, the first VM would write information to the physical device 190, and the physical device would then transmit the data outside the apparatus. The second VM 112 illustrates the read case. In this example, physical memory 181 illustrates the transmit buffer of the network interface, and physical memory 182 illustrates the receive buffer.
Typically, if the first VM 111 wishes to communicate with the second VM 112, the first VM attempts to communicate with the second VM as if the second VM was a device outside of the apparatus 101. As a result, data is written to the physical device 190, and then read from the physical device by the second virtual machine. In the network interface example, the loopback feature of the network interface is used to route the data from the first VM to the second VM, and vice versa.
This loopback solution is typically used by VMware, Inc. (VMware) of Palo Alto, Calif. The VMware solution provides for running two or more operating systems, such as Linux and Microsoft Windows, on a single machine, using the facilities provided by the operating system that runs on the underlying hardware.